home *** CD-ROM | disk | FTP | other *** search
- # login.cmd for PPP connection to Hawaii Online 4/95
-
- # Define varaibles
- $echoinit = "e1"
- $loginprompt = "ogin:"
- $pwprompt = "assword:"
- $confirmation = "beginning..."
- %attempts = 10
-
- # Load parameters stored in trumpwsk.ini
- %ok = [load $number]
- %ok = %ok + [load $othernumber]
- %ok = %ok + [load $username]
- %ok = %ok + [load $prefix]
- %ok = %ok + [load $modemstring]
- %ok = %ok + [load $password]
- %ok = %ok + [load $dialtype]
- if %ok < 5
- display \n"Your login parameters are not set."\r
- display "Select Dialer from the pulldown menu and click on setup.cmd."\n
- abort
- end
-
- # Set dial command based on dial type
- if $dialtype = "tone"
- $dialcmd = "atdtw"
- else
- $dialcmd = "atdpw"
- end
-
- # Set the rest of the dial string
- if $prefix <> ""
- $dialcmd = $dialcmd + $prefix
- end
-
- # Check for modem
- output "at"\13
- if ! [input 10 OK\n]
- display \n"Your modem is not responding. Please check the following:"\n
- display "1. Make sure all cables are securely connected."\n
- display "2. External modems should be plugged in and turned on."\n
- display "3. Other software that can access the modem (fax managers, etc.) should be disabled."\n
- display "4. Make sure the proper comm port has been selected."\n
- abort
- end
-
- # Send modem initialization string. Ensure echo is enabled.
- if $modemstring = ""
- $modemstring = "at" + $echoinit
- else
- $modemstring = $modemstring + $echoinit
- end
- output $modemstring\13
- if ! [input 10 OK\n]
- display \n"There is an error in the modem init string. Trying the default setting now."\n
- output "at&f"\13
- end
-
- # Dial into Hawaii OnLine...retry if no connection
- %n = 0
- repeat
- if %n = %attempts
- display \n"Maximum dial attempts reached. Pleas try again a little latter."\n
- abort
- end
- # Alternate between phone numbers
- if (%n % 2)
- display \n"Dialing alternate number..."\n
- outputecho 30 $dialcmd$othernumber\13
- else
- display \n"Dialing primary number..."\n
- outputecho 30 $dialcmd$number\13
- end
- %notimeout = [read 15 $response]
- if %notimeout & $response = "BUSY"
- %ok = 0
- else
- %ok = [input 45 $loginprompt]
- end
- %n = %n + 1
- until %ok
-
- # Send username
- if $username = ""
- username Input your username
- end
- # Note, the P preceeding the username is needed for PPP
- output P$username\13
-
- # Send password
- input 25 $pwprompt
- if $password = ""
- password Input your password
- end
- output $password\13
-
- # we are now logged in
-
- # Wait for confirmation that SLIP/PPP is working
- input 15 $confirmation
- display \nYou are now connected to the Internet!\n
- # login.cmd for PPP connection to Hawaii Online 4/95
-
- # Define varaibles
- $echoinit = "e1"
- $loginprompt = "ogin:"
- $pwprompt = "assword:"
- $confirmation = "beginning..."
- %attempts = 10
-
- # Load parameters stored in trumpwsk.ini
- %ok = [load $number]
- %ok = %ok + [load $othernumber]
- %ok = %ok + [load $username]
- %ok = %ok + [load $prefix]
- %ok = %ok + [load $modemstring]
- %ok = %ok + [load $password]
- %ok = %ok + [load $dialtype]
- if %ok < 5
- display \n"Your login parameters are not set."\r
- display "Select Dialer from the pulldown menu and click on setup.cmd."\n
- abort
- end
-
- # Set dial command based on dial type
- if $dialtype = "tone"
- $dialcmd = "atdtw"
- else
- $dialcmd = "atdpw"
- end
-
- # Set the rest of the dial string
- if $prefix <> ""
- $dialcmd = $dialcmd + $prefix
- end
-
- # Check for modem
- output "at"\13
- if ! [input 10 OK\n]
- display \n"Your modem is not responding. Please check the following:"\n
- display "1. Make sure all cables are securely connected."\n
- display "2. External modems should be plugged in and turned on."\n
- display "3. Other software that can access the modem (fax managers, etc.) should be disabled."\n
- display "4. Make sure the proper comm port has been selected."\n
- abort
- end
-
- # Send modem initialization string. Ensure echo is enabled.
- if $modemstring = ""
- $modemstring = "at" + $echoinit
- else
- $modemstring = $modemstring + $echoinit
- end
- output $modemstring\13
- if ! [input 10 OK\n]
- display \n"There is an error in the modem init string. Trying the default setting now."\n
- output "at&f"\13
- end
-
- # Dial into Hawaii OnLine...retry if no connection
- %n = 0
- repeat
- if %n = %attempts
- display \n"Maximum dial attempts reached. Pleas try again a little latter."\n
- abort
- end
- # Alternate between phone numbers
- if (%n % 2)
- display \n"Dialing alternate number..."\n
- outputecho 30 $dialcmd$othernumber\13
- else
- display \n"Dialing primary number..."\n
- outputecho 30 $dialcmd$number\13
- end
- %notimeout = [read 15 $response]
- if %notimeout & $response = "BUSY"
- %ok = 0
- else
- %ok = [input 45 $loginprompt]
- end
- %n = %n + 1
- until %ok
-
- # Send username
- if $username = ""
- username Input your username
- end
- # Note, the P preceeding the username is needed for PPP
- output P$username\13
-
- # Send password
- input 25 $pwprompt
- if $password = ""
- password Input your password
- end
- output $password\13
-
- # we are now logged in
-
- # Wait for confirmation that SLIP/PPP is working
- input 15 $confirmation
- display \nYou are now connected to the Internet!\n
-